package com.li.hsanguosha.net;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.li.hsanguosha.msg.NetCode;
import com.li.hsanguosha.msg.NetMessage;
import io.netty.channel.ChannelHandlerContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class MessageDispatch {

    static Logger log = LoggerFactory.getLogger(MessageDispatch.class);

    // 单例
    public final static MessageDispatch Instance = new MessageDispatch();


    public void receiveData(ChannelHandlerContext ctx, String netMsg) {
        NetMessage msg = JSON.parseObject(netMsg, NetMessage.class);

        switch (NetCode.getType(msg.getCode())) {
            case Non -> {
                log.warn("收到未知请求");
            }
            case UserRegister -> {

            }
            case UserLogin -> {
            }
            case Matching -> {
            }
            case MatchResp -> {
            }
            case AllPlayerInfo -> {
            }
            case MainSel -> {
            }
            case OtherSel -> {
            }
            case PlayerHeroInfo -> {
            }
            case Deal -> {
            }
            case CardNumInfo -> {
            }
            case AwaitShowCard -> {
            }
            case ShowCard -> {
            }
            case ShowCardNonPlayer -> {
            }
            case ShowCardHavePlayer -> {
            }
            case ShowCardSha -> {
            }
            case RespShowCardInfo -> {
            }
            case Abandon -> {
            }
            case HpUpdate -> {
            }
            case Help -> {
            }
            case NoticeResp -> {
            }
            case Discard -> {
            }
            case BingLingCunDuan -> {
            }
            case GuoHeChaiQiao -> {
            }
            case JieDaoShaRen -> {
            }
            case JueDou -> {
            }
            case LeBuSiShu -> {
            }
            case ManZuRuQin -> {
            }
            case ShunShouQianYang -> {
            }
            case TaoYuanJieYi -> {
            }
            case WanJianQiFa -> {
            }
            case WuGuFengDeng -> {
            }
            case WuXieKeJi -> {
            }
            case WuZhongShengYou -> {
            }
            case WuGuFengDengInfo -> {
            }
            case LoseEquip -> {
            }
            case BuffStatus -> {
            }
            case Equip -> {
            }
            case ZhangBaMaoSha -> {
            }
            case HanBingJianSel -> {
            }
        }
    }


}
